html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    padding: 0;

    background-color: #7A419B;
    background-size: cover;
    background: linear-gradient(135deg, #7c1599 0%,#921099 48%,#7e4ae8 100%);

    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.player {
    max-width: 750px;
    border: 5px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);

    position: relative;

    overflow: hidden;

    font-size: 12px;
}

.player-video {
    width: 100%;
}

.player-button {
    max-width: 50px;
    padding: 0;
    border-width: 0;
    background-color: transparent;

    color: white;
    line-height: 1;
    text-align: center;
    outline: 0;

    cursor: pointer;
}

.player-button:focus {
    border-color: #ffc600;
}

.player-slider {
    width: 10px;
    height: 30px;
}

.player-controls {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);

    display: flex;
    flex-wrap: wrap;

    position: absolute;
    bottom: 0;

    transform: translateY(100%) translateY(-5px); /* 可以连用两个一样的属性 */
    transition: all 0.3s;
}

.player:hover .player-controls {
    transform: translateY(0); /* hover 时显示控件 */
}

.player:hover .progress {
    height: 15px;
}

.player-controls > * {
    flex: 1;
}

.progress {
    height: 5px;
    background-color: rgba(0, 0, 0, 0.5);

    position: relative;

    display: flex;
    flex: 10;
    flex-basis: 100%; /* 进度条长度占父宽 */

    transition: height 0.3s;

    cursor: ew-resize;
}

.progress-filled {
    width: 50%;
    background-color: #ffc600;

    flex: 0;
    flex-basis: 50%; /* 初始状态时占一半的父宽 */
}

/* unholy css to style input type="range" */

input[type=range] {
    width: 100%;
    margin: 0 5px;
    background-color: transparent;

    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8.4px;
    border: 0.2px solid rgba(1, 1, 1, 0);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.8);
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0), 0 0 1px rgba(13, 13, 13, 0);

    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50px;
    margin-top: -3.5px;
    background-color: #ffc600;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(13, 13, 13, 0);
    box-shadow: 0 0 2px rgba(0,0,0,0.2); /* ??? */

    cursor: pointer;
    -webkit-appearance: none;
}

/*input[type=range]:focus::-wefbkit-slider-runnable-track {
    background-color: #bada55;
}*/

input[type=range]::-moz-range-track {
    width: 100%;
    height: 8.4px;
    border: 0.2px solid rgba(1, 1, 1, 0);
    border-radius: 1.3px;
    background-color: #ffffff;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0), 0 0 1px rgba(13, 13, 13, 0);

    cursor: pointer;
}

input[type=range]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50px;
    background-color: #ffc600;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(13, 13, 13, 0);

    cursor: pointer;
}
